""""
字符串相关模块
"""

def str_reverse(s):
    """
    字符串反转函数
    :param s: 传入的字符串
    :return: 返回反转的字符串
    """
    return s[::-1]

def substr(s,x,y):
    """
    按照下标x和y对函数进行切片
    :param s:传入的字符串
    :param x:切片的开始下标
    :param y:切片的结束下标
    :return:按照x和y下标切片的字符串
    """
    return s[x:y]

if __name__ == '__main__':
    s = str_reverse('hello')
    s1 =substr('hello', 0,2)
    print(f"{s},{s1}")
